﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gpsys.Entity.Dapper;

namespace Gpsys.Web.Business
{
    /// <summary>
    /// BaseBusiness
    /// </summary>
    public class BaseBusiness
    {
        private SqlHelper m_sql;

        /// <summary>
        /// Gets the SQL.
        /// </summary>
        /// <value>
        /// The SQL.
        /// </value>
        protected SqlHelper SQL
        {
            get
            {
                if (m_sql == null)
                {
                    m_sql = new SqlHelper();
                }

                return m_sql;
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="BaseBusiness" /> class.
        /// </summary>
        /// <param name="sql">The SQL.</param>
        public BaseBusiness(SqlHelper sql)
        {
            m_sql = sql;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="BaseBusiness" /> class.
        /// </summary>
        public BaseBusiness()
        {

        }
    }
}
